import request from '@/utils/request.js'
import { useUserStore } from '@/stores/userStore.js'

/**
 * 司机提现
 */
export function apiWithdraw ({ bankName, bankCardId, withdrawAmount }) {
	return request.post({
		url: `/withdraw/withdraw`,
		data: {
			id: useUserStore().getCurrentDriver().id,
			bankName, 
			bankCardId, 
			withdrawAmount
		}
	})
}

/**
 * 查询提现分页
 */
export function apiGetWithdrawPage ({ pageNum, pageSize }) {
	return request.get({
		url: `/withdraw/page`,
		params: {
			pageNum,
			pageSize
		}
	})
}